<!DOCTYPE html>
<html>

{include file='public/header'}

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">记录管理</a>
            <a><cite>每日用户充值消耗</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" id="reload" title="刷新">
            <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
        </a>
    </div>
    <div class="x-body">
        

        <table id="video" lay-filter="video"></table>
    </div>
    <script type="text/html" id="tbBar">
        <a class="layui-btn layui-btn-xs" lay-event="look">查看详情</a>
    </script>
    <script>
        let params = {
            elem: '#video'
            , toolbar: '#toolbarDemo'
            , url: '/admin/user/userAnalysis' //数据接口
            , page: true //开启分页
            , id: 'video'
            , limit:15
            , cols: [[//表头
                { field: 'date', title: '日期', width: 120, align:'center'}
                , { field: 'activation_user_num', title: '激活用户数', align:'center'}
                , { field: 'recharge_user_num', title: '充值用户数', align:'center'}
                , { field: 'recharge_money', title: '当日充值金额（仅统计普通充值，元）', align:'center', width: 280 }
                , { field: 'total_recharge', title: '累计充值（元）', align:'center', width: 180 }
                , { field: 'consume_k_coins', title: '消耗K币', width: 180, align:'center' }
                , { field: 'account_balance', title: '累计K币余额', width: 180, align:'center' }
                , { field: 'per_capita_recharge', title: '充值用户人均充值（元）', width: 210, align:'center' }
                , { field: 'per_capita_consume', title: '充值用户人均消耗（K币数）', align:'center', width: 210 }
                // , { toolbar: '#tbBar', title: '操作', align:'center'}
            ]]

        }
        tableList(params)

        layui.use('table', function () {
            var table = layui.table;
            
            table.on('tool(video)', function (obj) {
                var event = obj.event;
                if (event === 'look') {
                    x_admin_show(`查看详情`, `./info.html?id=${obj.data.id}`, 1200, 573,null);
                }
            });

        });

        layui.use('laydate', function(){
            layui.laydate.render({
                elem: '#register_date'
            });
            layui.laydate.render({
                elem: '#follow_date'
            });
        })
    </script>

</body>

</html>